package com.ygz.aaroutputtest

import android.content.Intent
import android.net.Uri
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.zoryang.commonutils.DeviceUtil
import com.zoryang.commonutils.Operator

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
//        Operator.Builder(this.application)
//            .isLog(true)
//            .build()
//        DeviceUtil.isEmulator {
//            Log.e("MainActivity", "000000000000000000")
//        }
        val intent = Intent()
        intent.data = Uri.parse("tel:" + "123456")
        intent.action = Intent.ACTION_DIAL
        // 是否可以处理跳转到拨号的 Intent
        val canResolveIntent = intent.resolveActivity(this.packageManager!!) != null
        startActivity(intent)
        Log.e("MainActivity", "$canResolveIntent")
    }
}